<!--[if IE 8.0]>
<!doctype html>
<![endif]-->
<!--[if IE 9.0]>
<!doctype html>
<![endif]-->
 <!--[if IE 6.0]>
<!doctype html>
<![endif]-->
 <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<html>
    <head>
        <?php
        $dbClass = new Database();
        $dbClass->connect();

        $htmlClass = new HTMLFunctions();
        $pagesClass = new Pages();
        $ctgClass = new Categories();
        $nlClass = new Newsletter();
        $setClass = new Settings();
        $zoneClass = new Zones();
        $modClass = new Modules();
        $newsClass = new News();
        $topClass = new Top();
        $picClass = new SLCPicture();
        $offersClass = new Offers();
        $pdfClass = new PDF();
        ?>
        <!-- <meta http-equiv="Content-Type" content="text/html; charset=Cp1252"> -->

        <?php include DIR_MODULES . 'meta/index.php'; ?>

        <script type="text/javascript">
            $(document).ready(function (){
                var count = $('#meniu_vertical_child > span').size();
                var totalWidth = 0;
                var maxWidth = $('#meniu_vertical_child').width();

                for (var i=1; i<=count; i++){
                    var w = $('#link' + i).width();
                    totalWidth = totalWidth + w;
                }

                while (totalWidth > maxWidth){
                    totalWidth = 0;
                    for (var x=1; x<=count; x++){
                        var width = $('#link' + x).width();
                        var idLink = $('#link' + x);
                        var currentFontSize = idLink.css('font-size');
                        var currentFontSizeNum = parseFloat(currentFontSize, 10);
                        var newFontSize = currentFontSizeNum * 0.95;

                        idLink.css('font-size', newFontSize);
                        idLink.css('height', '50px');
                        totalWidth = totalWidth + width;
                    }
                }
            });
        </script>

        <script language="javascript">AC_FL_RunContent = 0;</script>
        <?php 
            if ($_GET['pg'] == 'categories' && $_GET['id'] != '2')
                include DIR_MODULES . 'head/categorii.php';
            elseif ($_GET['pg'] == 'categories' && $_GET['id'] == '2')
                include DIR_MODULES . 'head/categorii_corp.php';
            elseif ($_GET['pg'] == 'pages')
                include DIR_MODULES . 'head/pagini.php';
            elseif ($_GET['pg'] == 'top')
                include DIR_MODULES . 'head/top.php';
            elseif ($_GET['pg'] == 'news')
                include DIR_MODULES . 'head/news.php';
            elseif ($_GET['pg'] == 'offers' && $_GET['cid'] != '2')
                include DIR_MODULES . 'head/oferte.php';
            elseif ($_GET['pg'] == 'offers' && $_GET['cid'] == '2')
                include DIR_MODULES . 'head/oferte_corp.php';
            else
                include DIR_MODULES . 'head/home.php';
        ?>
    </head>

    <?php 
        if (strpos($_SERVER['REQUEST_URI'], "/index.html") || $_SERVER['REQUEST_URI'] == '/daimtour/'){
            echo '<body id="bg_body">';
        } elseif ($_GET['pg'] == 'offers') {?>
            <body id="bg_body_var" onload="initialize()">
        <?php } else {
            echo '<body id="bg_body_var">';
        }
    ?>

    <div id="root">
    <!-- header /////////////////////////////////////////////// -->
    <?php 
        if (strpos($_SERVER['REQUEST_URI'], "/index.html") || $_SERVER['REQUEST_URI'] == '/daimtour/')
            include DIR_MODULES . 'menu/menu_top_home.php';
        elseif ($_GET['pg'] == 'search') 
            include DIR_MODULES . 'menu/menu_top_search.php';
        elseif ($_GET['pg'] == 'sitemap')
            include DIR_MODULES . 'menu/menu_top_sitemap.php';
        elseif ($_GET['pg'] == 'categories' && $_GET['id'] == '2')
            include DIR_MODULES . 'menu/menu_top_categories_corp.php';
        elseif ($_GET['pg'] == 'categories' && $_GET['id'] != '2')
            include DIR_MODULES . 'menu/menu_top_categories.php';
        elseif ($_GET['pg'] == 'pages')
            include DIR_MODULES . 'menu/menu_top_pages.php';
        elseif ($_GET['pg'] == 'news' || $_GET['pg'] == 'top')
            include DIR_MODULES . 'menu/menu_top_news_and_top.php';
        elseif ($_GET['pg'] == 'offers' && $_GET['cid'] == '2')
            include DIR_MODULES . 'menu/menu_top_oferte_corp.php';
        elseif ($_GET['pg'] == 'offers' && $_GET['cid'] != '2')
            include DIR_MODULES . 'menu/menu_top_oferte.php';
        else
            include DIR_MODULES . 'menu/menu_top_restul.php';
    ?>
    </div>
    <!-- end header /////////////////////////////////////////// -->